<?php defined('KX_ROOT') || exit('Permission denied');?><!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    <title><?php include \Kuxin\View::parseTpl($tkd['title']);?></title>
    <meta name="keywords" content="<?php include \Kuxin\View::parseTpl($tkd['keywords']);?>">
    <meta name="description" content="<?php include \Kuxin\View::parseTpl($tkd['description']);?>">
    <link rel="stylesheet" type="text/css" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno2/css/ptm.min.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno2/css/skin.min.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno2/css/font-awesome.min.css" />
</head>
<body>
<header class="ptm-bar ptm-bar-nav  ptm-fix">
    <a class="ptm-pull-left" href="<?php echo \Kuxin\Helper\Url::build("user.index.index",[],"");?>">
        <span class="ptm-iconfont fa fa-user"></span>
    </a>
    <div class="ptm-title"><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></div>
    <a class="ptm-pull-right" href="<?php echo \Kuxin\Helper\Url::build("novel.search.index",[],"");?>">
        <span class="ptm-iconfont  fa fa-search"></span>
    </a>
</header>
<section class="ptm-content" style="margin-top:45px;">
    <div class="ptm-tab">
        <ul class="ptm-tab-nav">
            <li class="active"><a href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "mobileurl");?>">首页</a></li>
            <li><a href="<?php echo \Kuxin\Helper\Url::build("novel.rank.index",[],"");?>">排行</a></li>
            <li><a href="<?php echo \Kuxin\Helper\Url::build("novel.category.index",[],"");?>">分类</a></li>
            <li><a href="<?php echo \Kuxin\Helper\Url::build("novel.over.index",[],"");?>">全本</a></li>
            <li><a href="<?php echo \Kuxin\Helper\Url::build("novel.search.index",[],"");?>">搜书</a></li>
        </ul>
    </div>
    <div class="ptm-clearfix " style="margin:10px 10px 0">
        <form class="searchbox fl" action="<?php echo \Kuxin\Helper\Url::build("novel.search.result",[],"");?>">
            <input name="searchtype" type="hidden" value="novelname">
            <div class="ptm-col-xs-9">
                <input type="search" name="searchkey" placeholder="请输入您要搜索的小说" autocomplete="off" style="margin-bottom:0">
            </div>
            <div class="ptm-col-xs-3">
                <button class="ptm-btn ptm-btn-primary" style="width:100%;font-size:18px;padding-top:8px;padding-bottom:8px">搜 索</button>
            </div>
        </form>
    </div>

    <?php $marklist=\Kuxin\Block::show('mark.list', ['userid'=>$userinfo['id'],'order'=>$order]);?>
    <?php if(count($marklist)>0):?>
    <div class="ptm-card" style="margin-top:10px;">
        <div class="ptm-card-header ptm-clearfix">
            <div class="ptm-pull-left">
                书架有更新的书
            </div>
        </div>
        <div class="ptm-card-content">
            <ul class="pt-card pt-card-3">
                <?php if(is_array($marklist)): foreach($marklist as $key =>$loop):?>
                <?php if($loop['markinfo']['newnum']):?>
                <li>
                    <div class="pt-cover">
                        <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>" title="<?php echo $loop['novel']['name'];?>">
                            <img class="lzld" src="<?php echo $loop['novel']['cover'];?>" alt="<?php echo $loop['novel']['name'];?>">
                        </a>
                    </div>
                    <div class="pt-novel" onclick="window.location.href='<?php echo \Kuxin\Helper\Url::build("novel.chapter.read",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin'],'chapterid'=>$loop['markinfo']['nextid']],"");?>'">
                        <?php if($loop['markinfo']['newnum']):?><span class="ptm-badge ptm-badge-danger pt-mark-badge"><?php echo $loop['markinfo']['newnum'];?>未读</span><?php endif;?>
                        <div class="pt-name" style="margin-bottom:8px;"><a title="<?php echo $loop['novel']['name'];?>"><?php echo $loop['novel']['name'];?></a></div>
                        <div class="pt-author"><a><?php echo $loop['author']['name'];?></a></div>
                        <div class="pt-author ptm-text-cut"><?php echo $loop['last']['name'];?></div>
                        <div class="pt-info"><?php echo cntime($loop['last']['time']);?></div>
                    </div>
                </li>
                <?php endif;?>
                <?php endforeach; endif;?>
            </ul>
        </div>
    </div>
    <?php endif;?>
    <div class="ptm-card" style="margin-top:10px;">
        <div class="ptm-card-header ptm-clearfix">
            <div class="ptm-pull-left">
                站长推荐
            </div>
        </div>
        <div class="ptm-card-content" style="padding:0">
            <ul class="ptm-list-view ptm-grid-view pt-card-1">
                <?php $list=\Kuxin\Block::show('recommend', ['recommendid'=>2,'num'=>3]);?>
                <?php if(is_array($list)): foreach($list as $key =>$loop):?>
                <li class="ptm-list-view-cell ptm-img ptm-col-xs-4">
                    <div class="imgarea">
                        <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['data']['novel']['id'],'pinyin'=>$loop['data']['novel']['pinyin']],"");?>" title="<?php echo $loop['data']['novel']['name'];?>"><img class="ptm-img-object" src="<?php echo $loop['data']['novel']['cover'];?>" alt="<?php echo $loop['data']['novel']['name'];?>"></a>
                    </div>
                    <div class="ptm-img-body">
                        <span class="ptm-block pt-name ptm-text-cut"><a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['data']['novel']['id'],'pinyin'=>$loop['data']['novel']['pinyin']],"");?>" title="<?php echo $loop['data']['novel']['name'];?>"><?php echo $loop['data']['novel']['name'];?></a></span>
                    </div>
                </li>
                <?php endforeach; endif;?>
            </ul>
        </div>
    </div>
    <div class="ptm-card" style="margin-top:10px;">
        <div class="ptm-card-header ptm-clearfix">
            热门推荐
        </div>
        <div class="ptm-card-content">
            <ul class="pt-card pt-card-7">
                <?php $list=\Kuxin\Block::show('recommend', ['recommendid'=>1,'num'=>5]);?>
                <?php if(is_array($list)): foreach($list as $key =>$loop):?>
                <li>
                    <div class="pt-cover">
                        <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['data']['novel']['id'],'pinyin'=>$loop['data']['novel']['pinyin']],"");?>" title="<?php echo $loop['data']['novel']['name'];?>"><img src="<?php echo $loop['data']['novel']['cover'];?>" alt="<?php echo $loop['data']['novel']['name'];?>"></a>
                    </div>
                    <div class="pt-novel">
                        <div class="pt-num ptm-pull-right"></div>
                        <div class="pt-name"><a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['data']['novel']['id'],'pinyin'=>$loop['data']['novel']['pinyin']],"");?>"><?php echo $loop['data']['novel']['name'];?></a></div>
                        <div class="pt-author"><?php echo $loop['data']['author']['name'];?></div>
                        <div class="pt-desc ptm-text-cut"><?php echo showIntroLine($loop['data']['novel']['intro']);?></div>
                    </div>
                </li>
                <?php endforeach; endif;?>
            </ul>
        </div>
    </div>
    <div class="ptm-card" style="margin-top:10px;">
        <div class="ptm-card-header ptm-clearfix">
            本周排行
        </div>
        <div class="ptm-card-content">
            <ul class="pt-card pt-card-3">
                <?php $list=\Kuxin\Block::show('novel.list', ['sort'=>"weekvisit",'num'=>5]);?>
                <?php if(is_array($list) && (array()!=$list)): $i=array(); $i['loop']=array_slice($list,0,null,true); $i['total']=count($list); $i['count']=count($i['loop']); $i['cols']=1; $i['add']=$i['count']%1?1-$i['count']%1:0; $i['order']=0; $i['row']=1;$i['col']=0;foreach(array_pad($i['loop'],$i['add'],array()) as $i['index']=>$i['list']): $loop=$i['list']; $i['order']++; $i['col']++; if($i['col']==1): $i['col']=0; $i['row']++; endif; $i['first']=$i['order']==1; $i['last']=$i['order']==$i['count']; $i['extra']=$i['order']>$i['count'];?>
                <li>
                    <div class="pt-cover">
                        <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>" title="<?php echo $loop['novel']['name'];?>"><img src="<?php echo $loop['novel']['cover'];?>" alt="<?php echo $loop['novel']['name'];?>"></a>
                    </div>
                    <div class="pt-novel">
                        <div class="pt-num ptm-pull-right"></div>
                        <div class="pt-name" style="margin-bottom:8px;"><a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>"><?php echo $loop['novel']['name'];?></a></div>
                        <div class="pt-author"><?php echo $loop['author']['name'];?> | <a href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$loop['category']['id'],'key'=>$loop['category']['key']],"");?>"><?php echo $loop['category']['name'];?></a> | <?php echo \Kuxin\View::default($loop['novel']['is_over'],"连载中","已完结");?></div>
                        <div class="pt-author ptm-text-cut"><a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>"><?php echo $loop['last']['name'];?></a></div>
                        <div class="pt-info"><?php echo cntime($loop['last']['time']);?>更新</div>
                    </div>
                </li>
                <?php endforeach; endif;?>
            </ul>
        </div>
    </div>
    <div class="ptm-card" style="margin-top:10px;">
        <div class="ptm-card-header ptm-clearfix">
            最新更新
        </div>
        <div class="ptm-card-content">
            <ul class="pt-card pt-card-6">
                <?php $list=\Kuxin\Block::show('novel.list', ['sort'=>"lastupdate",'num'=>10,'cachetime'=>600]);?>
                <?php if(is_array($list)): foreach($list as $key =>$loop):?>
                <li>
                    <div class="pt-novel">
                        <div class="pt-one">
                            <span class="pt-author">[<?php echo \Kuxin\View::date($loop['last']['time'],"H:i");?>] </span>
                            <span class="pt-name"><a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>"><?php echo $loop['novel']['name'];?></a></span>
                            <span class="pt-author"><?php echo $loop['author']['name'];?></span>
                        </div>
                        <div class="pt-desc ptm-text-cut "><?php echo $loop['last']['name'];?></div>
                    </div>
                </li>
                <?php endforeach; endif;?>
            </ul>
        </div>
    </div>
</section>
<div class="ptm-line-x"></div>
<div class="footer">
    <p>本站系基于互联网搜索引擎技术为您提供信息检索服务。</p>
    <p>
        <a title="关于我们" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'about'],"");?>" class="color4">关于我们</a>
        <a title="隐私声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'privacy'],"");?>" class="color4">隐私条款</a>
        <a title="免责声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'disdaimer'],"");?>" class="color4">免责声明</a>
    </p>
    <p>Copyright ©<?php echo date(Y);?> </p>
</div>
<script type="text/javascript" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno2/script/zepto.min.js"></script>
<script type="text/javascript" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno2/script/ptm.min.js"></script>
<script type="text/javascript" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno2/script/ptcms.min.js"></script>
<br>
<br>
<footer class="ptm-nav" style="border-top:1px solid #eee">
    <ul class="ptm-bar-tab">
        <li onclick="window.location.href='<?php echo \Kuxin\Helper\Url::build("user.mark.index",[],"");?>'">
            <span class="ptm-iconfont fa fa-book"></span>
            <p>书架</p>
        </li>
        <li class="active">
            <span class="ptm-iconfont fa fa-home"></span>
            <p>书城</p>
        </li>
        <li onclick="window.location.href='<?php echo \Kuxin\Helper\Url::build("user.index.index",[],"");?>'">
            <span class="ptm-iconfont fa fa-user"></span>
            <p>我的</p>
        </li>
    </ul>
</footer>
</body>
</html>